package com.yuanfengPlus.production.Mapper;

import com.yuanfengPlus.production.model.ProdMachine;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProdMachinesMapper {

    // 查询所有机器
    @Select("SELECT * FROM prod_machines")
    List<ProdMachine> selectAll();

    // 根据机器ID查询机器
    @Select("SELECT * FROM prod_machines WHERE machine_id = #{machineId}")
    ProdMachine selectById(int machineId);

    // 根据工作中心ID查询所有机器
    @Select("SELECT * FROM prod_machines WHERE work_center_id = #{workCenterId}")
    List<ProdMachine> selectByWorkCenterId(int workCenterId);
}
